# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-asteval
pkgver=0.9.31
_commit=ecfcbeb13d95e9cc41ed8b00e69972cec5de76ba
pkgrel=1
pkgdesc="Minimalistic evaluator of python expression using ast module"
url="https://github.com/newville/asteval"
license=('MIT')
arch=('any')
depends=('python')
makedepends=('git' 'python-build' 'python-installer' 'python-setuptools-scm' 'python-wheel')
checkdepends=('python-pytest-cov' 'python-numpy' 'tk')
source=("git+https://github.com/newville/asteval.git#commit=$_commit")
sha512sums=('SKIP')

build() {
  cd asteval
  python -m build -nw
}

check() {
  cd asteval
  python -m pytest
}

package() {
  cd asteval
  python -m installer -d "$pkgdir" dist/*.whl
  install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
}
